package com.caiyi.financial.nirvana.sms.controller;

import com.caiyi.financial.nirvana.sms.querybean.QueryReceiveMessage;
import com.caiyi.financial.nirvana.sms.service.SmsReceiveMessageService;
import com.youyu.common.api.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(description = "上行短信管理接口")
@CrossOrigin
@RestController
@RequestMapping("sms/receiveMessage")
public class ReceiveMessageController extends BaseController {

    @Autowired
    private SmsReceiveMessageService receiveMessageService;

    @ApiOperation(value = "根据条件查找上行短信详情", notes = "根据条件查找上行短信描述")
    @PostMapping("/getReceiveMessageList")
    public Result getReceiveMessageList(@RequestBody @ApiParam(name = "bean", value = "查找上行短信实体", required = true) QueryReceiveMessage bean) {
        bean.setAccount(smsUser.getAccount());
        return Result.ok(receiveMessageService.getReceiveMessageListByParams(bean));
    }
}
